from django.db import models

# Create your models here.
from utils.BaseModel import BaseModel
class Nav(BaseModel):
    name = models.CharField(max_length=20,verbose_name='导航名称')
    position = models.IntegerField(verbose_name='导航位置',default=0)
    link = models.CharField(max_length=100,verbose_name='导航链接',default='')
    class Meta:
        db_table = 'nav'
    def __str__(self):
        return self.name

class Banner(BaseModel):
    title = models.CharField(max_length=20,verbose_name='轮播标题')
    ingurl = models.ImageField(upload_to='uploads/banner',verbose_name='轮播图片')
    link = models.CharField(max_length=200,verbose_name='轮播链接',default='')
    class Meta:
        db_table = 'fgbanner'
    def __str__(self):
        return self.title